 import request from '@/utils/request'
 export function getList(params) {
    return request({
      url: '/merchandise/query',
      method: 'get',
      params
    })
  }
  export function addType(data) {
    return request({
      url: '/merchandise/add',
      method: 'post',
      data
    })
  }
    export function deleteType(params) {
        return request({
        url: '/merchandise/del',
        method: 'post',
        params
        })
    }

    export function updateType(data) {
        return request({
        url: '/merchandise/update',
        method: 'post',
        data
        })
    }
    
    export function getDetails(data) {
      return request({
      url: '/merchandise/update',
      method: 'post',
      data
      })
  }
  export function getDetail(id) {
    return request({
      url: `/merchandise/details/${id}`,
      method: 'get' 
    });
  }
  export function getMerchandiseDetails(id) {
    return request({
        url: `/merchandise/detail/${id}`,
        method: 'get'
    });
}

export function submitReview(data) {
  return request({
      url: '/merchandise/addAudit',
      method: 'post',
      data
  });
}